﻿//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.9.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on: 
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
////////////////////////////////////////////////////////////// 
using System;
using System.Linq;
using LLBLGenPro.OrmCookbook.EntityClasses;
using LLBLGenPro.OrmCookbook.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.QuerySpec.AdapterSpecific;
using SD.LLBLGen.Pro.QuerySpec;

namespace LLBLGenPro.OrmCookbook.FactoryClasses
{
	/// <summary>Factory class to produce DynamicQuery instances and EntityQuery instances</summary>
	public partial class QueryFactory : QueryFactoryBase2
	{
		/// <summary>Creates and returns a new EntityQuery for the Department entity</summary>
		public EntityQuery<DepartmentEntity> Department { get { return Create<DepartmentEntity>(); } }

		/// <summary>Creates and returns a new EntityQuery for the Division entity</summary>
		public EntityQuery<DivisionEntity> Division { get { return Create<DivisionEntity>(); } }

		/// <summary>Creates and returns a new EntityQuery for the Employee entity</summary>
		public EntityQuery<EmployeeEntity> Employee { get { return Create<EmployeeEntity>(); } }

		/// <summary>Creates and returns a new EntityQuery for the EmployeeClassification entity</summary>
		public EntityQuery<EmployeeClassificationEntity> EmployeeClassification { get { return Create<EmployeeClassificationEntity>(); } }

		/// <summary>Creates and returns a new EntityQuery for the EmployeeDetail entity</summary>
		public EntityQuery<EmployeeDetailEntity> EmployeeDetail { get { return Create<EmployeeDetailEntity>(); } }

		/// <summary>Creates and returns a new EntityQuery for the Product entity</summary>
		public EntityQuery<ProductEntity> Product { get { return Create<ProductEntity>(); } }

		/// <summary>Creates and returns a new EntityQuery for the ProductLine entity</summary>
		public EntityQuery<ProductLineEntity> ProductLine { get { return Create<ProductLineEntity>(); } }

		/// <inheritdoc/>
		protected override IElementCreatorCore CreateElementCreator() { return new ElementCreator(); }
 
		/// <summary>Gets the projection to project the resultset of stored procedure HR.CountEmployeesByClassification to the typed view CountEmployeesByClassificationResult</summary>
		/// <returns>Projection in the form of a Dynamic Query which projects to <see cref="LLBLGenPro.OrmCookbook.TypedViewClasses.CountEmployeesByClassificationResultRow"/> instances </returns>
		public DynamicQuery<LLBLGenPro.OrmCookbook.TypedViewClasses.CountEmployeesByClassificationResultRow> GetCountEmployeesByClassificationResultTypedViewProjection()
		{
			return this.Create().Select(ProjectionLambdaCreator.Create<LLBLGenPro.OrmCookbook.TypedViewClasses.CountEmployeesByClassificationResultRow>(ModelInfoProviderSingleton.GetInstance().GetTypedViewFields("CountEmployeesByClassificationResultTypedView"), true));
		}

		/// <summary>Gets the projection to project the resultset of stored procedure HR.CreateEmployeeClassification to the typed view CreateEmployeeClassificationResult</summary>
		/// <returns>Projection in the form of a Dynamic Query which projects to <see cref="LLBLGenPro.OrmCookbook.TypedViewClasses.CreateEmployeeClassificationResultRow"/> instances </returns>
		public DynamicQuery<LLBLGenPro.OrmCookbook.TypedViewClasses.CreateEmployeeClassificationResultRow> GetCreateEmployeeClassificationResultTypedViewProjection()
		{
			return this.Create().Select(ProjectionLambdaCreator.Create<LLBLGenPro.OrmCookbook.TypedViewClasses.CreateEmployeeClassificationResultRow>(ModelInfoProviderSingleton.GetInstance().GetTypedViewFields("CreateEmployeeClassificationResultTypedView"), true));
		}

		/// <summary>Creates and returns the query to fetch the typed view DepartmentDetail</summary>
		public DynamicQuery<LLBLGenPro.OrmCookbook.TypedViewClasses.DepartmentDetailRow> DepartmentDetail
		{
			get { return this.Create().Select<LLBLGenPro.OrmCookbook.TypedViewClasses.DepartmentDetailRow, LLBLGenPro.OrmCookbook.HelperClasses.DepartmentDetailFields>(); }
		}

		/// <summary>Gets the projection to project the resultset of stored procedure HR.GetEmployeeClassifications to the typed view GetEmployeeClassificationsResult</summary>
		/// <returns>Projection in the form of a Dynamic Query which projects to <see cref="LLBLGenPro.OrmCookbook.TypedViewClasses.GetEmployeeClassificationsResultRow"/> instances </returns>
		public DynamicQuery<LLBLGenPro.OrmCookbook.TypedViewClasses.GetEmployeeClassificationsResultRow> GetGetEmployeeClassificationsResultTypedViewProjection()
		{
			return this.Create().Select(ProjectionLambdaCreator.Create<LLBLGenPro.OrmCookbook.TypedViewClasses.GetEmployeeClassificationsResultRow>(ModelInfoProviderSingleton.GetInstance().GetTypedViewFields("GetEmployeeClassificationsResultTypedView"), true));
		}

	}
}